package mylib.archive.y2012.m09.IFMO_Train;

import mylib.dir.FastInputReader;

import java.io.PrintWriter;
import java.math.BigInteger;

public class TaskI {
    public void solve(int testNumber, FastInputReader in, PrintWriter out) {
        int n = in.nextInt();
        BigInteger ans = BigInteger.ZERO;
        BigInteger[][] dm = new BigInteger[26][110];
        for (int i = 0; i < 26; ++i)
            for (int j = 0; j < 110; ++j)
                dm[i][j] = BigInteger.ZERO;
        for (int j = 0; j < 110; ++j) {
            for (int i = 25; i >= 0; --i) {
                if (i == 25) {
                    dm[i][j] = BigInteger.ONE;
                } else {
                    dm[i][j] = dm[i][j].add(BigInteger.ONE);
                    for (int lenOther = 1; lenOther <= 110; ++lenOther) {
                        for (int c = 1; c <= 110; ++c) {
                            if (c + lenOther * (c + 1) == j) {
                                dm[i][j] = dm[i][j].add(dm[i + 1][lenOther].pow(c + 1));
                            }
                        }
                    }
                }
            }
        }
        for (int c = 0; c < 26; ++c)
            ans = ans.add(dm[c][n]);
        out.print(ans);
    }
}
